FROM php:7.4-fpm

RUN touch /etc/apt/sources.list
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y git

ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN install-php-extensions @composer
RUN install-php-extensions redis
RUN install-php-extensions pdo_mysql
RUN install-php-extensions mcrypt
RUN install-php-extensions gd
RUN install-php-extensions xdebug
RUN install-php-extensions sockets
RUN install-php-extensions mysqli
RUN install-php-extensions bcmath


CMD ["php-fpm"]

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

EXPOSE 9000